package com.supermarket.api.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 分类表
 * @author 李其伟
 * @date 2023/10/17
 */
@Data
@Entity
@Table(name = "sm_category")
@org.hibernate.annotations.Table(appliesTo = "sm_category",comment="分类表")
public class CategoryEntity extends BaseEntity {

    @Column(name = "p_id", columnDefinition = " bigint(20) comment '父ID' ")
    private Long pId;

    @Column(name = "name", columnDefinition = " varchar(256) not null comment '名称' ")
    private String name;

    @Column(name = "level", columnDefinition = " int(11) comment '分类级别：0->1级；1->2级' ")
    private Integer level;

    @Column(name = "publish_status", columnDefinition = " int(11) comment '上架状态：0->下架；1->上架' ")
    private Integer publishStatus;

    @Column(name = "pic", columnDefinition = " varchar(256) comment '图片' ")
    private String pic;

    @Column(name = "keywords", columnDefinition = " varchar(256) comment '关键字' ")
    private String keywords;

    @Column(name = "description", columnDefinition = " varchar(2048) comment '描述' ")
    private String description;

    @Column(name = "sort", columnDefinition = " int(11) comment '排序' ")
    private Integer sort;
}
